<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>帅哥美女走一走</title>
    <!-- <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script> -->
</head>

<body>
    <div id="app">
        <h1>帅哥美女走一走</h1>
        <ul>
            <li v-for="(item, index) in people">{{ item }}</li>
        </ul>
        <button @click="move">走一走</button>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                people: ['美女', '程序猿', '帅哥']
            },
            methods: {
                move() {
                    this.people.push(this.people.shift()); // 数组的shift()方法用于删除数组的第一个元素，并返回被删除的元素。
                }
            }
        });
    </script>
</body>

</html>